/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
@import "../../stylesheets/less/cosmo/variables.less";
@import "../../stylesheets/less/variables.less";

body {
  overflow: hidden;
}

.inlineBlock {
  display: inline-block;
}
.valignTop {
  vertical-align: top;
}
.inline {
  display: inline;
}
.nopadding {
  padding: 0px;
}
.loading {
  width: 50px;
  margin-top: 15px;
}
.pane-cell {
  padding: 10px;
  overflow: auto;
  width: 100%;
  height: 100%;
}

.tab-content {
  height: 100%;
  position: relative;
  background-color: @lightest;

  > .tab-pane {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
  }
}

.Workspace .btn-sm {
  box-shadow: 1px 1px 2px fade(@darkest, @opacity-light);
  margin-top: 2px;
  padding: 4px;
}
.Workspace hr {
  margin-top: 10px;
  margin-bottom: 10px;
}
div.Workspace {
  height: 100%;
  margin: 0px;
}
.padded {
  padding: 10px;
}

.p-t-10 {
  padding-top: 10px;
}
.p-t-5 {
  padding-top: 5px;
}
.m-r-5 {
  margin-right: 5px;
}
.m-r-3 {
  margin-right: 3px;
}
.m-l-1 {
  margin-left: 1px;
}
.m-l-2 {
  margin-left: 2px;
}
.m-r-10 {
  margin-right: 10px;
}
.m-l-10 {
  margin-left: 10px;
}
.m-l-5 {
  margin-left: 5px;
}
.m-b-10 {
  margin-bottom: 10px;
}
.m-t-5 {
  margin-top: 5px;
}
.m-t-10 {
  margin-top: 10px;
}
.p-t-10 {
  padding-top: 10px;
}
.sql-toolbar {
  padding: 10px 10px 5px 10px;
  background-color: @gray-bg;
  display: flex;
  justify-content: space-between;
  border: 1px solid @gray-light;
  border-top: 0;
  form {
    margin-block-end: 0;
  }
  .leftItems form, .rightItems {
    & > span {
      margin-right: 5px;
      margin-bottom: 5px;
      display: inline-block;
      &:last-child {
        margin-right: 0;
      }
    }
  }
}
.no-shadow {
  box-shadow: none;
  background-color: transparent;
}
.pane-west {
  height: 100%;
  overflow: auto;
}
.circle {
  border-radius: 50%;
  width: 10px;
  height: 10px;
  display: inline-block;
  background-color: @gray-light;
  line-height: 8px;
  text-align: center;
  vertical-align: middle;
  font-size: 15px;
  margin-top: -3px;
  font-weight: bold;
}
.running {
  background-color: fade(@success, @opacity-heavy);
  color: @darkest;
}
.success {
  background-color: @success;
}
.failed {
  background-color: @error;
}

.handle {
  cursor: move;
}
.window {
  z-index: 1000;
  position: absolute;
  width: 300px;
  opacity: 0.85;
  border: 1px solid @gray-heading;
  max-height: 600px;
  box-shadow: fade(@darkest, @opacity-heavy) 5px 5px 25px;
}
.SqlLab pre {
  padding: 0px !important;
  margin: 0px;
  border: none;
  font-size: 12px;
  background-color: transparent !important;
}

#a11y-query-editor-tabs {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.SqlLab {
  position: absolute;
  top: 0px;
  right: 0px;
  bottom: 0px;
  left: 0px;
  padding: 0 10px;

  .north-pane {
    display: flex;
    flex-direction: column;
  }

  #brace-editor {
    height: calc(100% - 51px);
    flex-grow: 1;
  }

  .ace_content {
    height: 100%;
  }

  .SouthPane {
    height: 100%;
  }

  .scrollbar-container {
    overflow: auto;
  }
}

.SqlEditorTabs li {
  a:focus {
    outline: 0;
  }

  .ddbtn-tab {
    font-size: inherit;
    font-weight: bold;

    &:active {
      background: none;
    }
  }

  .dropdown-toggle {
    padding-top: 2px;
  }
}

.SqlEditor {
  display: flex;
  flex-direction: row;
  height: 100%;
  padding: 10px;

  .schemaPane {
    flex: 0 0 300px;
    max-width: 300px;
    transition: transform 0.3s ease-in-out;
  }

  .queryPane {
    flex: 1 1 auto;
    padding-left: 10px;
  }
}

.SqlEditorLeftBar {
  height: 100%;
  display: flex;
  flex-direction: column;

  .divider {
    border-bottom: 1px solid @gray-bg;
    margin: 15px 0;
  }

  .scrollbar-container {
    flex: 1 1 auto;
    overflow: auto;
  }
}

.popover {
  max-width: 400px;
}

.table-label {
  margin-top: 5px;
  margin-right: 10px;
  float: left;
}

div.tablePopover {
  opacity: 0.7 !important;
}

div.tablePopover:hover {
  opacity: 1 !important;
}

.ResultSetControls {
  padding: 8px 0;
}

.ace_editor {
  border: 1px solid @gray-light;
}

.Select-menu-outer {
  min-width: 100%;
  width: inherit;
  z-index: 1000;
}

.Select-clear {
  margin-top: -2px;
}

.Select-arrow {
  margin-top: 5px;
}

.ace_scroller {
  background-color: @gray-bg;
}

.TableElement {
  margin-right: 10px;
}

.TableElement .well {
  margin-top: 5px;
  margin-bottom: 5px;
  padding: 5px 10px;
}

.TableElement .ws-el-controls {
  margin-right: -0.3em;
}

.QueryTable .label {
  display: inline-block;
}

.ResultsModal .modal-body {
  min-height: 600px;
}

.modal-body {
  overflow: auto;
}

a.Link {
  cursor: pointer;
}
.QueryTable .well {
  padding: 3px 5px;
  margin: 3px 5px;
}
.tooltip pre {
  background: transparent;
  border: none;
  text-align: left;
  color: @lightest;
  font-size: 10px;
}
.tooltip-inner {
  max-width: 500px;
  word-wrap: break-word;
}
.SouthPane {
  width: 100%;

  .SouthPaneTabs {
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  .tab-pane {
    overflow-y: auto; // scroll the query history pane
  }
}

.nav-tabs .ddbtn-tab {
  padding: 0;
  border: none;
  background: none;

  &:focus {
    outline: 0;
  }
  &:active {
    box-shadow: none;
  }
}
.icon-container {
  display: inline-block;
  width: 30px;
  text-align: center;
}
.search-date-filter-container {
  display: flex;

  .Select {
    margin-right: 3px;
  }
}

.SouthPane .tab-content .alert {
  margin-top: 10px;
}

.SouthPane .tab-content button.fetch {
  margin-top: 10px;
}

.cost-estimate {
  font-size: 12px;
}
